package vip.youngboy.freejump.persist.form;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import vip.youngboy.freejump.domain.form.FormDef;
import vip.youngboy.freejump.repository.FormDefRepository;

import java.util.List;

@Component
public class DefaultFormPersistence implements FormPersistence {

    @Autowired
    private FormDefRepository formDefRepository;

    @Override
    public List<FormDef> getFormDefByFormKey(String formKey) {
        List<FormDef> formDefs = formDefRepository.findAllByFormKey(formKey);
        return formDefs;
    }

}
